<script setup>
import { inject, ref } from "vue";
import { useCounterStore } from "@/stores/upgrade";
import { handleGoBack } from "@/utils/router";

// const form = useCounterStore ();

const dateobj = useCounterStore();

const current = ref(1);
const signature = ref("");

function signatureEvent(base64) {
  signature.value = base64;
}
const lastfun = () => {
  handleGoBack();
};

const time = ref(3);
const onChange = (e) => {
  time.value = e.seconds;
};
const nextfun = () => {
  if (time.value > 0) {
    return;
  }

  uni.navigateTo({
    url: "/pages/upgrade/upgradepay",
  });
};
</script>

<template>
  <view class="upgrade">
    <!-- <stepsview :current="current"></stepsview> -->

    <view class="agreement-content">
      <view class="agreement-title">购买店主经销商套餐合同</view>
      <view class="agreement-text"
        >购买店主经销商套士大夫撒地方送达是的发送到防守打法水电费士大夫稍等,是的发送啥地方阿斯蒂芬
        餐合同</view
      >
      <!-- <image :src="signature" mode="scaleToFill" /> -->

      <view class="signature-k">
        <xz-signature @save="signatureEvent" />
      </view>
    </view>
  </view>

  <view class="foodr-bt">
    <view class="bt-next" @click="lastfun">上一步</view>
    <view class="bt-sbuit" @click="nextfun"
      ><u-count-down :time="3 * 1000" format="ss" @change="onChange"
        ><text v-if="time > 0">{{ time }}秒后</text> 同意协议</u-count-down
      >
    </view>
  </view>
</template>

<style lang="scss" scoped>
@import "./index.scss";
</style>
